package com.yyge.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 用户属性信息表-用户的附属信息
 * @TableName user_attribute
 */
@TableName(value ="user_attribute")
@Data
public class UserAttribute implements Serializable {
    /**
     * 主键ID

     */
    @TableId(value = "id")
    private Long id;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 设备ID
     */
    @TableField(value = "device_id")
    private String deviceId;

    /**
     * 是否是会员 1=会员
     */
    @TableField(value = "vip")
    private Integer vip;

    /**
     * 是否是管理员 1=管理员
     */
    @TableField(value = "admin")
    private Integer admin;

    /**
     * 余额
     */
    @TableField(value = "balance")
    private Integer balance;

    /**
     * URL上限
     */
    @TableField(value = "url_upper_limit")
    private Integer urlUpperLimit;

    /**
     * Js上限
     */
    @TableField(value = "js_upper_limit")
    private Integer jsUpperLimit;

    /**
     * 逻辑删除 1=删除
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * 更新人
     */
    @TableField(value = "updata_user")
    private Long updataUser;

    /**
     * 更新时间
     */
    @TableField(value = "updata_time")
    private Date updataTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserAttribute other = (UserAttribute) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
            && (this.getVip() == null ? other.getVip() == null : this.getVip().equals(other.getVip()))
            && (this.getAdmin() == null ? other.getAdmin() == null : this.getAdmin().equals(other.getAdmin()))
            && (this.getBalance() == null ? other.getBalance() == null : this.getBalance().equals(other.getBalance()))
            && (this.getUrlUpperLimit() == null ? other.getUrlUpperLimit() == null : this.getUrlUpperLimit().equals(other.getUrlUpperLimit()))
            && (this.getJsUpperLimit() == null ? other.getJsUpperLimit() == null : this.getJsUpperLimit().equals(other.getJsUpperLimit()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getUpdataUser() == null ? other.getUpdataUser() == null : this.getUpdataUser().equals(other.getUpdataUser()))
            && (this.getUpdataTime() == null ? other.getUpdataTime() == null : this.getUpdataTime().equals(other.getUpdataTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
        result = prime * result + ((getVip() == null) ? 0 : getVip().hashCode());
        result = prime * result + ((getAdmin() == null) ? 0 : getAdmin().hashCode());
        result = prime * result + ((getBalance() == null) ? 0 : getBalance().hashCode());
        result = prime * result + ((getUrlUpperLimit() == null) ? 0 : getUrlUpperLimit().hashCode());
        result = prime * result + ((getJsUpperLimit() == null) ? 0 : getJsUpperLimit().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getUpdataUser() == null) ? 0 : getUpdataUser().hashCode());
        result = prime * result + ((getUpdataTime() == null) ? 0 : getUpdataTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", deviceId=").append(deviceId);
        sb.append(", vip=").append(vip);
        sb.append(", admin=").append(admin);
        sb.append(", balance=").append(balance);
        sb.append(", urlUpperLimit=").append(urlUpperLimit);
        sb.append(", jsUpperLimit=").append(jsUpperLimit);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", updataUser=").append(updataUser);
        sb.append(", updataTime=").append(updataTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}